#include<stdio.h>
int leap(int a)
{
	if(a%4==0&&a%100!=0||a%400==0)
	return 1;
	else
	return 0;
} 
int number(int year,int m,int d)
{
	int sum=0;
	int i,j,k;
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int b[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	if (leap(year)==1)
	{
		for(i=0;i<m-1;i++)
		{
			sum+=b[i];
		}
	}
	else
	{
		for(j=0;j<m-1;j++)
		{
			sum+=a[j];
		}
	}
	sum+=d;
	return sum;	
}
int main ()
{
	int year,month,day;
	int n;
	printf("please input year,month,day\n");
	scanf("%d-%d-%d",&year,&month,&day);
	n=number(year,month,day);
	printf("%d\n",n);
	return 0;
} 
